package com.neoCalf.neoCommon.enums;

import lombok.Getter;

import java.util.Objects;


@Getter
public enum RoleEnum {
    ADMIN("ADMIN"),
    USER("USER");

    private final String role;

    RoleEnum(String role) {
        this.role = role;
    }

    public static RoleEnum getByType(String name) {
        for (RoleEnum roleEnum : RoleEnum.values()) {
            if (name != null && roleEnum.toString() == name) {
                return roleEnum;
            }
        }
        return null;
    }
}
